<!DOCTYPE html>
<html>

	<head>
		<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1">
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" href="../../css/iuapmobile.um.css">
		<link rel="stylesheet" href="../../css/font-icons.css">
		<link rel="stylesheet" href="../../css/iscroll.css" />
		<script src="../../js/summer.js"></script>
		<script src="../../js/jquery.min.js"></script>
		<script src="../../js/Frameworks/iuapmobile.frameworks.ui.js"></script>
		<script src="../../js/iscroll.js"></script>
		<script src="../../js/angular.min.js"></script>
		<script src="../../js/mobiscroll_002.js" type="text/javascript"></script>
		<script src="../../js/mobiscroll_004.js" type="text/javascript"></script>
		<link href="../../css/mobiscroll.css" rel="stylesheet" type="text/css">
		<script src="../../js/mobiscroll.js" type="text/javascript"></script>
		<script src="../../js/mobiscroll_003.js" type="text/javascript"></script>
		<script src="../../js/mobiscroll_005.js" type="text/javascript"></script>
		<link href="../../css/mobiscroll_003.css" rel="stylesheet" type="text/css">
		<style>
			.select_dummy {
				border: none;
				padding-left: 10px;
				color: #555;
				font-size: 14px;
				text-align: right;
				margin-right: 20px;
				width: 100%;
			}
			
			.select_dummy:disabled {
				background: #fff;
			}
			
			.cart-reduce,
			.cart-add {
				display: inline-block;
				font-size: 16px;
				color: RGB(157, 194, 59);
				white-space: nowrap;
				text-align: center;
				cursor: pointer;
				border-radius: 50%;
				width: 22px;
				height: 22px;
				border: 1px solid RGB(157, 194, 59);
				padding: 0;
				z-index: 10;
				line-height: 18px;
			}
			
			.cart-count {
				max-width: 30px;
				border: none;
				border-bottom: 1px solid RGB(157, 194, 59);
				text-align: center;
				-moz-appearance: textfield;
			}
		</style>

	</head>

	<body class="f14" ng-app="myApp" ng-controller="myCtrl" ng-init="shfwzt=true">
		<!--um-win-->
		<div class="um-page" id="shangjiatuozhan">
			<div class="um-header">
				<a href="#" class="um-back back"> 返回 </a>
				<h3>商家信息录入</h3>
				<a href="#" class="um-header-right">
				<p>
				<span class="menu">暂存</span>&nbsp;
				<span class="readzc">读取</span>
				</p>
				 </a>
			</div>
			<div class="um-content">
				<form id="">
					<ul class="um-list">
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										<span class="um-red">*</span>合同编号
									</div>
									<div class="um-list-item-right">
										<button class="btns btn-sm" onclick="readsjxx()" style="width:40%;float: right;height: 100%;margin: 0px auto;">读取</button>
										<input type="text" style="width:60%;height: 100%;float: right;margin-top: 5px" class="form-control tr" placeholder="请填写" ng-model="tsjno" required onchange="javascript:angularScope.bdwh = this.value+'-1';angularScope.$apply();void(0);">
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										<span class="um-red">*</span>合同A面
									</div>
									<div class="um-list-item-right">
										<img id="tconimage1" onclick="openCamera(this,pageid)" ng-src="{{tconimage1}}" class="h50 p5 camera" />
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										<span class="um-red">*</span>合同B面
									</div>
									<div class="um-list-item-right">
										<img id="tconimage2" onclick="openCamera(this,pageid)" ng-src="{{tconimage2}}" class="h50 p5 camera" />
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										<span class="um-red">*</span>合同A+B面
									</div>
									<div class="um-list-item-right">
										<img id="tconimage12" onclick="openCamera(this,pageid)" ng-src="{{tconimage12}}" class="h50 p5 camera" />
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										<span class="um-red">*</span>商家注册名称
									</div>
									<div class="um-list-item-right">
										<input type="text" ng-model="tsjzcmc" class="form-control tr" placeholder="请填写" required>
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										<span class="um-red">*</span>商家注册地址
									</div>
									<div class="um-list-item-right">
										<input type="text" ng-model="tsjzcdz" class="form-control tr" placeholder="请填写" required>
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										<span class="um-red">*</span>商家经营名称
									</div>
									<div class="um-list-item-right">
										<input type="text" ng-model="tsjjymc" class="form-control tr" placeholder="请填写" required>
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										<span class="um-red">*</span>商家经营地址
									</div>
									<div class="um-list-item-right">
										<input type="text" ng-model="tsjjydz" class="form-control tr" placeholder="请填写" required>
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										<span class="um-red">*</span>法定代表人名称
									</div>
									<div class="um-list-item-right">
										<input type="text" ng-model="tfddbname" class="form-control tr" placeholder="请填写" required>
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										法人身份证照正面
									</div>
									<div class="um-list-item-right">
										<img id="def21" onclick="openCamera(this,pageid)" ng-src="{{def21}}" class="h50 p5 camera" />
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										法人身份证照反面
									</div>
									<div class="um-list-item-right">
										<img id="def22" onclick="openCamera(this,pageid)" ng-src="{{def22}}" class="h50 p5 camera" />
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										<span class="um-red">*</span>法人联系方式1
									</div>
									<div class="um-list-item-right">
										<input type="tel" ng-model="tfddbtel1" class="form-control tr" placeholder="请填写" required>
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										法人联系方式2
									</div>
									<div class="um-list-item-right">
										<input type="tel" ng-model="tfddbtel2" class="form-control tr" placeholder="请填写" required>
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										<span class="um-red">*</span>店面负责人
									</div>
									<div class="um-list-item-right">
										<input type="text" ng-model="tdmfzr" class="form-control tr" placeholder="请填写" required>
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										<span class="um-red">*</span>店面联系方式1
									</div>
									<div class="um-list-item-right">
										<input type="tel" ng-model="tdmtel1" class="form-control tr" placeholder="请填写" required>
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										店面联系方式2
									</div>
									<div class="um-list-item-right">
										<input type="tel" ng-model="tdmtel2" class="form-control tr" placeholder="请填写" required>
									</div>
								</div>
							</div>
						</li>
						<!--
						<li>
						<div class="um-list-item">
						<div class="um-list-item-inner">
						<div class="um-list-item-left pl5">
						<span class="um-red">*</span>经营类型
						</div>
						<div class="um-list-item-right">
						<select id='selectjingyingleixing' class="select" ng-model="tjytype" multiple="multiple">
						<option ng-repeat="x in jingyingleixing" value="{{x.pk_doc}}">{{x.doc_name}}</option>
						</select>
						</div>
						</div>
						</div>
						</li>
						-->
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										<span class="um-red">*</span>商家类别
									</div>
									<div class="um-list-item-right">
										<select ng-model="tsjlb" id='selectshangjialeibie' class="select" multiple="multiple">
											<option ng-repeat="x in shangjialeibie" value="{{x.pk_doc}}">{{x.doc_name}}</option>
										</select>
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										商业广告投放要求
									</div>
									<div class="um-list-item-right">
										<label class="um-switch2 um-box-vc ">
											<input type="checkbox" class="um-switch2" id="def25" ng-model="def25" ng-checked="def25" onchange="isRequest()"/>
											<span class="um-switch2-check" data-on-text="有" data-off-text="无"  style="margin-right: 0px; "></span> </label>
									</div>
								</div>
							</div>
						</li>
						<li class="lidef24">
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										过滤条件
									</div>
									<div class="um-list-item-right">
										<select ng-model="def24" id='selectguanggao' class="select" multiple="multiple">
											<option ng-repeat="x in guanggao" value="{{x.pk_doc}}">{{x.doc_name}}</option>
										</select>
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										<span class="um-red">*</span>账号类别
									</div>
									<div class="um-list-item-right">
										<select ng-model="def8" id='selectzhanghaoleibie' class="select">
											<option ng-repeat="x in zhanghaoleibie" value="{{x.pk_doc}}">{{x.doc_name}}</option>
										</select>
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										<span class="um-red">*</span>经营属性
									</div>
									<div class="um-list-item-right">
										<div id="disselectjingyingshuxing" style="width: 100%;height: 200px;position: absolute;z-index: 10;display: none;"></div>
										<select ng-model="tjyproperties" id='selectjingyingshuxing' class="select">
											<option ng-repeat="x in jingyingshuxing" value="{{x.pk_doc}}">{{x.doc_name}}</option>
										</select>
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										营业执照
									</div>
									<div class="um-list-item-right">
										<img id="tyylicenseimage" onclick="openCamera(this,pageid)" ng-src="{{tyylicenseimage}}" class="h50 p5 camera" />
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										营业执照号
									</div>
									<div class="um-list-item-right">
										<input id="tyylicenseno" ng-model="tyylicenseno" type="text" class="form-control tr" placeholder="请填写" required>
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										<span class="um-red">*</span>经营面积
									</div>
									<div class="um-list-item-right">
										<input ng-model="tjyarea" onchange="inputChange(this)" id="tjyarea" type="number" class="form-control tr" placeholder="请填写" required style="padding-right: 0px;">
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										<span class="um-red">*</span>所属环线
									</div>
									<div class="um-list-item-right">
										<select ng-model="tsshx" id='selectsuoshuhuanxian' class="select">
											<option ng-repeat="x in suoshuhuanxian" value="{{x.pk_doc}}">{{x.doc_name}}</option>
										</select>
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										<span class="um-red">*</span>网络是否可用
									</div>
									<div class="um-list-item-right">
										<label class="um-switch2 um-box-vc ">
											<input type="checkbox" class="um-switch2" id="tisonline" ng-model="tisonline" ng-checked="tisonline" onchange="wlsfky()"/>
											<span class="um-switch2-check" data-on-text="是" data-off-text="否"  style="margin-right: 0px; "></span> </label>
									</div>
								</div>
							</div>
						</li>
						<li class="lidef7">
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										<span class="um-red">*</span>网络类型
									</div>
									<div class="um-list-item-right">
										<select ng-model="def7" id='selectwangluoleixin' class="select">
											<option ng-repeat="x in wangluoleixin" value="{{x.pk_doc}}">{{x.doc_name}}</option>
										</select>
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										<span class="um-red">*</span>省
									</div>
									<div class="um-list-item-right">
										<select ng-model="tprovince" id='selectsheng' class="select">
											<option ng-repeat="x in sheng" value="{{x.pk_doc}}">{{x.doc_name}}</option>
										</select>
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										<span class="um-red">*</span>市
									</div>
									<div class="um-list-item-right">
										<select ng-model="tcity" id='selectshi' class="select">
											<option ng-repeat="x in shi" value="{{x.pk_doc}}">{{x.doc_name}}</option>
										</select>
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										<span class="um-red">*</span>区
									</div>
									<div class="um-list-item-right">
										<select ng-model="tdistrict" id='selectqu' class="select">
											<option ng-repeat="x in qu" value="{{x.pk_doc}}">{{x.doc_name}}</option>
										</select>
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										<span class="um-red">*</span>所
									</div>
									<div class="um-list-item-right">
										<select ng-model="tinstitute" id='selectsuo' class="select">
											<option ng-repeat="x in suo" value="{{x.pk_doc}}">{{x.doc_name}}</option>
										</select>
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										<span class="um-red">*</span>所属商圈
									</div>
									<div class="um-list-item-right">
										<select ng-model="tsssq" id='selectsuoshushangquan' class="select">
											<option ng-repeat="x in suoshushangquan" code="{{x.doc_code}}" value="{{x.pk_doc}}">{{x.doc_name}}</option>
										</select>
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										<span class="um-red">*</span>商圈级别
									</div>
									<div class="um-list-item-right">
										<select ng-model="tsqlevel" id='selectshangquanjibie' class="select">
											<option ng-repeat="x in shangquanjibie" value="{{x.pk_doc}}">{{x.doc_name}}</option>
										</select>
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										<span class="um-red">*</span>人均消费
									</div>
									<div class="um-list-item-right">
										<input ng-model="trjxf" type="number" class="form-control tr" placeholder="请填写" required style="padding-right: 0px;">
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										<span class="um-red">*</span>企业分类
									</div>
									<div class="um-list-item-right">
										<select ng-model="tqyfl" id='selectqiyefenlei' class="select">
											<option ng-repeat="x in qiyefenlei" value="{{x.pk_doc}}">{{x.doc_name}}</option>
										</select>
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										<span class="um-red">*</span>门头照
									</div>
									<div class="um-list-item-right">
										<img id="tmtimage" onclick="openCamera(this,pageid)" ng-src="{{tmtimage}}" class="h50 p5 camera" />
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										有餐饮服务许可证
									</div>
									<div class="um-list-item-right">
										<label class="um-switch2 um-box-vc ">
											<input type="checkbox" class="um-switch2" id="shfwzt" ng-model="shfwzt" ng-checked="shfwzt" onchange="issh()"/>
											<span class="um-switch2-check" data-on-text="是" data-off-text="否"  style="margin-right: 0px; "></span> </label>
									</div>
								</div>
							</div>
						</li>
						<li class="sh">
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										<span class="um-red">*</span>餐饮服务许可证照
									</div>
									<div class="um-list-item-right">
										<img id="tcyfwxkzimage" onclick="openCamera(this,pageid)" ng-src="{{tcyfwxkzimage}}" class="h50 p5 camera" />
									</div>
								</div>
							</div>
						</li>
						<li class="sh">
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										<span class="um-red">*</span>餐饮服务许可证号
									</div>
									<div class="um-list-item-right">
										<input ng-model="tcyfwxkzno" type="text" class="form-control tr" placeholder="请填写" required onchange="javascript:angularScope.tsaxno = angularScope.tcyfwxkzno;angularScope.$apply();">
									</div>
								</div>
							</div>
						</li>
						<li class="sh">
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										<span class="um-red">*</span>食安心账号
									</div>
									<div class="um-list-item-right">
										<input ng-model="tsaxno" type="text" class="form-control tr" placeholder="请填写" required>
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										年度评级
									</div>
									<div class="um-list-item-right">
										<select ng-model="tanusualrate" id='selectniandupingji' class="select">
											<option ng-repeat="x in niandupingji" value="{{x.pk_doc}}">{{x.doc_name}}</option>
										</select>
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										动态评级
									</div>
									<div class="um-list-item-right">
										<img id="imgdongtaipingji" class="mt5 mb5 h30" src="" style="display: none;" />
										<span ng-model="dongtaipingjiBase" style="display: none;"></span>
										<select ng-model="tdynamicrate" id='selectdongtaipingji' class="select">
											<option ng-repeat="x in dongtaipingji" value="{{x.pk_doc}}">{{x.doc_name}}</option>
										</select>
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										<span class="um-red">*</span>开业日期
									</div>
									<div class="um-list-item-right">
										<label for="tkydate" style="width: 100%; height:30px;">
											<input ng-model="tkydate" id="tkydate" type="date" class="form-control tr" placeholder="请填写" required>
										</label>

									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										<span class="um-red">*</span>开店时间
									</div>
									<div class="um-list-item-right">
										<label for="tkdtime" style="width: 100%; height:30px;">
											<input ng-model="tkdtime" id="tkdtime" type="time" class="form-control tr timepicker" placeholder="请填写" required style="padding-right: 0px;">
										</label>
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										<span class="um-red">*</span>闭店时间
									</div>
									<div class="um-list-item-right">
										<label for="tbdtime" style="width: 100%; height:30px;">
											<input ng-model="tbdtime" id="tbdtime" type="time" class="form-control tr timepicker" placeholder="请填写" required style="padding-right: 0px;margin-right: 0px;">
										</label>
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										<span class="um-red">*</span>商店性质
									</div>
									<div class="um-list-item-right">
										<select ng-model="tstorenature" id='selectshangdianxingzhi' class="select">
											<option ng-repeat="x in shangdianxingzhi" value="{{x.pk_doc}}">{{x.doc_name}}</option>
										</select>
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										<span class="um-red">*</span>综合体
									</div>
									<div class="um-list-item-right">
										<label class="um-switch2 um-box-vc ">
											<input type="checkbox" class="um-switch2" ng-model="tzht" ng-checked="tzht"/>
											<span class="um-switch2-check" data-on-text="是" data-off-text="否"  style="margin-right: 0px; "></span> </label>
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										施工需求(工艺要求)
									</div>
									<div class="um-list-item-right">
										<input ng-model="tsgfdemand" type="text" class="form-control tr" placeholder="请填写" required>
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										<span class="um-red">*</span>审批类型
									</div>
									<div class="um-list-item-right">
										<select ng-model="def10" id='selectshenpileixin' class="select">
											<option ng-repeat="x in shenpileixin" value="{{x.pk_doc}}">{{x.doc_name}}</option>
										</select>
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										立式可安装数量
									</div>
									<div class="um-list-item-right">
										<input type="number" ng-model="def15" class="form-control tr libequipnum" placeholder="请填写" required style="padding-right: 0px;">
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										挂式可安装数量
									</div>
									<div class="um-list-item-right">
										<input type="number" ng-model="def16" class="form-control tr libequipnum" placeholder="请填写" required style="padding-right: 0px;">
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="um-list-item">
								<div class="um-list-item-inner">
									<div class="um-list-item-left pl5">
										备注
									</div>
									<div class="um-list-item-right">
										<input ng-model="vnote" type="text" class="form-control tr" placeholder="请填写" required>
									</div>
								</div>
							</div>
						</li>
					</ul>
				</form>

			</div>
			<div class="um-footer">
				<a href="#page2" id="changepage2"></a>
				<button class="um-btn" onclick="page1_2()">
					点位信息录入
				</button>
			</div>
		</div>

		<div class="um-page" id="page2">
			<div class="um-header">
				<a href="#" class="um-back bbback"> 返回 </a>
				<h3>点位信息录入</h3>
				<a href="#" class="um-header-right menu">暂存 </a>
			</div>
			<div class="um-content">
				<ul class="um-list">
					<li class="um-list-item">
						<div class="um-list-item-inner">
							<div class="um-list-item-left pl5">
								<span class="um-red">*</span>点位号
							</div>
							<div class="um-list-item-right">
								<input type="text" class="form-control tr" placeholder="请填写" ng-model="bdwh" required>
							</div>
						</div>
					</li>
					<li class="um-list-item">
						<div class="um-list-item-inner">
							<div class="um-list-item-left pl5">
								<span class="um-red">*</span>远景照
							</div>
							<div class="um-list-item-right">
								<img id="bfarimage" onclick="openCamera(this,pageid)" ng-src="{{bfarimage}}" class="h50 p5 camera" />
							</div>
						</div>
					</li>
					<li class="um-list-item">
						<div class="um-list-item-inner">
							<div class="um-list-item-left pl5">
								<span class="um-red">*</span>近景照
							</div>
							<div class="um-list-item-right">
								<img id="bcloseimage" onclick="openCamera(this,pageid)" ng-src="{{bcloseimage}}" class="h50 p5 camera" />
							</div>
						</div>
					</li>
					<li class="um-list-item">
						<div class="um-list-item-inner">
							<div class="um-list-item-left pl5">
								<span class="um-red">*</span>含点位全景照
							</div>
							<div class="um-list-item-right">
								<img id="baroundimage" onclick="openCamera(this,pageid)" ng-src="{{baroundimage}}" class="h50 p5 camera" />
							</div>
						</div>
					</li>
					<li>
						<div class="um-list-item">
							<div class="um-list-item-inner">
								<div class="um-list-item-left pl5">
									<span class="um-red">*</span>设备类型
								</div>
								<div class="um-list-item-right">
									<select id='selectshebeileixing' ng-model="bequiptype" class="select">
										<option ng-repeat="x in shebeileixing" value="{{x.pk_doc}}">{{x.doc_name}}</option>
									</select>
								</div>
							</div>
						</div>
					</li>
					<li>
						<div class="um-list-item">
							<div class="um-list-item-inner">
								<div class="um-list-item-left pl5">
									<span class="um-red">*</span>安装方式
								</div>
								<div class="um-list-item-right">
									<span style="display: none;" ng-model="anzhuangfangshiBase"></span>
									<select id='selectanzhuangfangshi' ng-model="bmountway" class="select">
										<option ng-repeat="x in anzhuangfangshi" value="{{x.pk_doc}}">{{x.doc_name}}</option>
									</select>
								</div>
							</div>
						</div>
					</li>
					<li class="libheight">
						<div class="um-list-item">
							<div class="um-list-item-inner">
								<div class="um-list-item-left pl5">
									<span class="um-red">*</span>层高
								</div>
								<div class="um-list-item-right">
									<input type="number" id="bheight" onchange="inputChange(this)" class="form-control tr" ng-model="bheight" placeholder="请填写" required style="padding-right: 0px;">
								</div>
							</div>
						</div>
					</li>
					<!--<li class="libheight">
					<div class="um-list-item">
					<div class="um-list-item-inner">
					<div class="um-list-item-left pl5">
					<span class="um-red">*</span>吊装支架数量
					</div>
					<div class="um-list-item-right">
					<input type="number" ng-model="def13" class="form-control tr" placeholder="请填写" required style="padding-right: 0px;">
					</div>
					</div>
					</div>
					</li>
					<li class="libheight">
					<div class="um-list-item">
					<div class="um-list-item-inner">
					<div class="um-list-item-left pl5">
					<span class="um-red">*</span>吊装加长装置数量
					</div>
					<div class="um-list-item-right">
					<input type="number" ng-model="def14" class="form-control tr" placeholder="请填写" required style="padding-right: 0px;">
					</div>
					</div>
					</div>
					</li>-->
					<li>
						<div class="um-list-item">
							<div class="um-list-item-inner">
								<div class="um-list-item-left pl5">
									<span class="um-red">*</span>摄像头数
								</div>
								<div class="um-list-item-right">
									<span class="cart-reduce " ng-click="bcameranum>=0?bcameranum=bcameranum+1:bcameranum=0">+</span>
									<input type="number" id="bcameranum" ng-model="bcameranum" class="cart-count" placeholder="请填写" required style="padding-right: 0px;">
									<span class="cart-add " ng-click="bcameranum>0?bcameranum=bcameranum-1:bcameranum=0">-</span>
								</div>
							</div>
						</div>
					</li>
					<li class="um-list-item">
						<div class="um-list-item-inner">
							<div class="um-list-item-left pl5">
								摄像头点1
							</div>
							<div class="um-list-item-right">
								<img id="bcamerap1" onclick="openCamera(this,pageid)" ng-src="{{bcamerap1}}" class="h50 p5 camera" />
							</div>
						</div>
					</li>
					<li class="um-list-item">
						<div class="um-list-item-inner">
							<div class="um-list-item-left pl5">
								摄像头点2
							</div>
							<div class="um-list-item-right">
								<img id="bcamerap2" onclick="openCamera(this,pageid)" ng-src="{{bcamerap2}}" class="h50 p5 camera" />
							</div>
						</div>
					</li>
					<li class="um-list-item">
						<div class="um-list-item-inner">
							<div class="um-list-item-left pl5">
								摄像头点3
							</div>
							<div class="um-list-item-right">
								<img id="def23" onclick="openCamera(this,pageid)" ng-src="{{def23}}" class="h50 p5 camera" />
							</div>
						</div>
					</li>

					<li>
						<div class="um-list-item">
							<div class="um-list-item-inner">
								<div class="um-list-item-left pl5">
									<span class="um-red">*</span>是否加急
								</div>
								<div class="um-list-item-right">
									<label class="um-switch2 um-box-vc ">
										<input type="checkbox" class="um-switch2" ng-model="bssjj" ng-checked="bssjj"/>
										<span class="um-switch2-check" data-on-text="是" data-off-text="否"  style="margin-right: 0px; "></span> </label>
								</div>
							</div>
						</div>
					</li>
					<li>
						<div class="um-list-item">
							<div class="um-list-item-inner">
								<div class="um-list-item-left pl5">
									备注
								</div>
								<div class="um-list-item-right">
									<input type="text" ng-model="vbnote" class="form-control tr" placeholder="请填写" required>
								</div>
							</div>
						</div>
					</li>
				</ul>

			</div>
			<div class="um-footer">
				<button class="um-btn" onclick="page2_submit()">
					提交
				</button>
			</div>
		</div>
	</body>

</html>

<script>
	var pageid = "shangjiatuozhan";
	var duqushangjia = false; //是否为读取商家信息
	//网络是否可用 开关
	function wlsfky() {
		setTimeout(function() {
			if(angularScope.tisonline) {
				$(".lidef7").show();
			} else {
				angularScope.def7 = "";
				angularScope.$apply();
				$("#selectwangluoleixin_dummy").val("请选择");
				$(".lidef7").hide();
			}
		}, 300);
	}

	function isRequest() {
		setTimeout(function() {
			if(angularScope.def25) {
				$(".lidef24").show();
			} else {
				angularScope.def24 = "";
				angularScope.$apply();
				$("#selectguanggao_dummy").val("请选择");
				$(".lidef24").hide();
			}
		}, 300);
	}

	//有餐饮服务许可证 开关
	function issh() {
		setTimeout(function() {
			if(angularScope.shfwzt) {
				$(".sh").show();
			} else {
				$(".sh").hide();
				angularScope.tcyfwxkzimage = "../../img/myimg/camera.png";
				imgs["tcyfwxkzimage"] = "";
				angularScope.tcyfwxkzno = "";
				angularScope.tsaxno = "";
				angularScope.$apply();
			}
		}, 200);
	}

	//所属商圈 城市pk
	function bindsuoshushangquan(cityCode, index) {
		doPost(adressHead.ISjtzImpl, "getBdDoc", {
			dataParm: {
				dostype: "nc_sq_" + cityCode
			}
		}, function(jsons) {
			angularScope.suoshushangquan = jsons;
			angularScope.tsssq = "";
			angularScope.$apply();
			$("#selectsuoshushangquan_dummy").val("请选择");
		}, null, true);
	}

	//审批类型
	function bindShenPiLeiXin() {
		doPost(adressHead.ISjtzImpl, "getBdDoc", {
			dataParm: {
				dostype: "app020"
			}
		}, function(jsons) {
			angularScope.shenpileixin = jsons;
			angularScope.$apply();
			$("#selectshenpileixin_dummy").val("请选择");

			//默认选中 正常
			for(var i = 0; i < jsons.length; i++) {
				if(jsons[i].doc_name == "正常") {
					$("#selectshenpileixin").val(jsons[i].pk_doc);
					$("#selectshenpileixin").trigger("change");

				}
			}
		}, null, true);
	}

	//网络类型
	function bindwangluoleixin() {
		doPost(adressHead.ISjtzImpl, "getBdDoc", {
			dataParm: {
				dostype: "app019"
			}
		}, function(jsons) {
			angularScope.wangluoleixin = jsons;
			angularScope.$apply();
			$("#selectwangluoleixin_dummy").val("请选择");
		}, null, true);
	}

	//传入省，编号
	function bindSheng(index) {
		doPost(adressHead.ISjtzImpl, "getBdDoc", {
			dataParm: {
				dostype: "app_s"
			}
		}, function(jsons) {
			angularScope.sheng = jsons;
			angularScope.shi = [];
			angularScope.qu = [];
			angularScope.suo = [];
			angularScope.tsssq = "";
			$("#selectsuoshushangquan_dummy").val("请选择");
			angularScope.$apply();
			$("#selectsheng_dummy").val("请选择");
			$("#selectshi_dummy").val("请选择");
			$("#selectqu_dummy").val("请选择");
			$("#selectsuo_dummy").val("请选择");

			if(index) {
				switch(index) {
					case 1:
						//取值
						if(!changeObj.tprovince) {
							DindChange();
						}
						bindShi(changeObj.tprovince, index);
						break;
					case 2:
						//定位
						for(var i = 0; i < jsons.length; i++) {
							if(jsons[i].doc_name.indexOf(gpsPoint.addressComponent.province) != -1) {
								angularScope.tprovince = jsons[i].pk_doc;
								$("#selectsheng_dummy").val($("#selectsheng option[value='" + jsons[i].pk_doc + "']").text());
								bindShi(jsons[i].pk_doc, index);
								break;
							}
						}
						break;
				}
			}
		}, null, true);
	}

	//绑定市
	function bindShi(shen, index) {
		if(!shen) {
			return;
		}
		doPost(adressHead.ISjtzImpl, "getBdDoc", {
			dataParm: {
				dostype: shen
			}
		}, function(jsons) {
			angularScope.shi = jsons;
			angularScope.qu = [];
			angularScope.suo = [];
			angularScope.tcity = null;
			angularScope.tdistrict = null;
			angularScope.tsssq = "";
			$("#selectsuoshushangquan_dummy").val("请选择");
			angularScope.$apply();
			$("#selectshi_dummy").val("请选择");
			$("#selectqu_dummy").val("请选择");
			$("#selectsuo_dummy").val("请选择");
			switch(index) {
				case 1:
					//取值
					if(!changeObj.tcity) {
						DindChange();
					}
					bindQu(changeObj.tcity, index);
					break;
				case 2:
					//定位
					for(var i = 0; i < jsons.length; i++) {
						if(jsons[i].doc_name.indexOf(gpsPoint.addressComponent.city) != -1) {
							angularScope.tcity = jsons[i].pk_doc;
							$("#selectshi_dummy").val($("#selectshi option[value='" + jsons[i].pk_doc + "']").text());
							bindQu(jsons[i].pk_doc, index);
							break;
						}
					}
					break;
			}
		}, null, true);
	}

	//绑定区
	function bindQu(shi, index) {
		if(!shi) {
			return;
		}
		bindsuoshushangquan(shi);
		doPost(adressHead.ISjtzImpl, "getBdDoc", {
			dataParm: {
				dostype: shi
			}
		}, function(jsons) {
			angularScope.qu = jsons;
			angularScope.suo = jsons;
			angularScope.$apply();
			$("#selectqu_dummy").val("请选择");
			$("#selectsuo_dummy").val("请选择");

			switch(index) {
				case 1:
					//取值
					if(!changeObj.tdistrict) {
						DindChange();
					}
					bindSuo(changeObj.tdistrict, index);
					break;
				case 2:
					//定位
					for(var i = 0; i < jsons.length; i++) {
						if(jsons[i].doc_name.indexOf(gpsPoint.addressComponent.district) != -1) {
							angularScope.tdistrict = jsons[i].pk_doc;
							$("#selectqu_dummy").val($("#selectqu option[value='" + jsons[i].pk_doc + "']").text());
							bindSuo(jsons[i].pk_doc, index);
							break;
						}
					}
					break;
			}
		}, null, true);
	}

	//绑定所
	function bindSuo(qu, index) {
		if(!qu) {
			return;
		}
		doPost(adressHead.ISjtzImpl, "getBdDoc", {
			dataParm: {
				dostype: qu
			}
		}, function(jsons) {
			angularScope.suo = jsons;
			angularScope.$apply();
			$("#selectsuo_dummy").val("请选择");

			switch(index) {
				case 1:
					//取值
					DindChange();
					break;
				case 2:
					//定位
					///////
					break;
			}
		}, null, true);
	}

	//账号类别
	function bindzhanghaoleibie() {
		doPost(adressHead.ISjtzImpl, "getBdDoc", {
			dataParm: {
				dostype: "app005"
			}
		}, function(jsons) {
			angularScope.zhanghaoleibie = jsons;
			angularScope.$apply();
			$("#selectzhanghaoleibie_dummy").val("请选择");
		}, null, true);
	}

	//商圈级别
	function bindshangquanjibie() {
		doPost(adressHead.ISjtzImpl, "getBdDoc", {
			dataParm: {
				dostype: "app001"
			}
		}, function(jsons) {
			angularScope.shangquanjibie = jsons;
			angularScope.$apply();
			$("#selectshangquanjibie_dummy").val("请选择");
		}, null, true);
	}

	//年度评级
	function bindniandupingji() {
		doPost(adressHead.ISjtzImpl, "getBdDoc", {
			dataParm: {
				dostype: "app002"
			}
		}, function(jsons) {
			angularScope.niandupingji = jsons;
			angularScope.$apply();
			$("#selectniandupingji_dummy").val("请选择");
		}, null, true);
	}

	//app动态评级
	function binddongtaipingji() {
		doPost(adressHead.ISjtzImpl, "getBdDoc", {
			dataParm: {
				dostype: "app003"
			}
		}, function(jsons) {
			angularScope.dongtaipingji = jsons;
			angularScope.dongtaipingjiBase = jsons;
			angularScope.$apply();
			$("#selectdongtaipingji_dummy").val("请选择");
		}, null, true);
	}

	//app商店性质
	function bindshangdianxingzhi() {
		doPost(adressHead.ISjtzImpl, "getBdDoc", {
			dataParm: {
				dostype: "app004"
			}
		}, function(jsons) {
			angularScope.shangdianxingzhi = jsons;
			angularScope.$apply();
			$("#selectshangdianxingzhi_dummy").val("请选择");
		}, null, true);
	}

	//绑定企业分类
	function bindqiyefenlei() {
		doPost(adressHead.ISjtzImpl, "getBdDoc", {
			dataParm: {
				dostype: "app006"
			}
		}, function(jsons) {
			angularScope.qiyefenlei = jsons;
			angularScope.$apply();
			$("#selectqiyefenlei_dummy").val("请选择");
		}, null, true);
	}

	//app经营属性
	function bindjingyingshuxing() {
		doPost(adressHead.ISjtzImpl, "getBdDoc", {
			dataParm: {
				dostype: "app007"
			}
		}, function(jsons) {
			angularScope.jingyingshuxing = jsons;
			angularScope.$apply();
			$("#selectjingyingshuxing_dummy").val("请选择");
		}, null, true);
	}

	//app经营类型
	function bindjingyingleixing() {
		doPost(adressHead.ISjtzImpl, "getBdDoc", {
			dataParm: {
				dostype: "app008"
			}
		}, function(jsons) {
			angularScope.jingyingleixing = jsons;
			angularScope.$apply();
			$("#selectjingyingleixing_dummy").val("请选择");
		}, null, true);
	}

	//app所属环线
	function bindsuoshuhuanxian() {
		doPost(adressHead.ISjtzImpl, "getBdDoc", {
			dataParm: {
				dostype: "app009"
			}
		}, function(jsons) {
			angularScope.suoshuhuanxian = jsons;
			angularScope.$apply();
			$("#selectsuoshuhuanxian_dummy").val("请选择");
		}, null, true);
	}

	//商家类别
	function bindshangjialeibie() {
		doPost(adressHead.ISjtzImpl, "getBdDoc", {
			dataParm: {
				dostype: "app010"
			}
		}, function(jsons) {
			angularScope.shangjialeibie = jsons;
			angularScope.$apply();
			$("#selectshangjialeibie_dummy").val("请选择");
		}, null, true);
	}

	//商家类别
	function bindguanggao() {
		doPost(adressHead.ISjtzImpl, "getBdDoc", {
			dataParm: {
				dostype: "app029"
			}
		}, function(jsons) {
			console.log(jsons);
			angularScope.guanggao = jsons;
			angularScope.$apply();
			$("#selectguanggao_dummy").val("请选择");
		}, null, true);
	}

	//设备类型
	function bindshebeileixing() {
		doPost(adressHead.ISjtzImpl, "getBdDoc", {
			dataParm: {
				dostype: "app_wl"
			}
		}, function(jsons) {
			angularScope.shebeileixing = jsons;
			angularScope.$apply();
			$("#selectshebeileixing_dummy").val("请选择");
		}, null, true);
	}

	//安装方式
	function bindanzhuangfangshi() {
		doPost(adressHead.ISjtzImpl, "getBdDoc", {
			dataParm: {
				dostype: "app012"
			}
		}, function(jsons) {
			angularScope.anzhuangfangshi = jsons;
			angularScope.anzhuangfangshiBase = jsons;
			//原始数据
			angularScope.$apply();
			$("#selectanzhuangfangshi_dummy").val("请选择");
		}, null, true);
	}
</script>
<script>
	var angularScope;
	//anglajs
	var pageParam;
	//打开当前页的参数
	var changeObj;
	//根据单号加载的数据 修改
	var gpsPoint;
	//百度定位返回的数据

	function inputChange(obj) {
		switch(obj.id) {
			case "bheight":
				//层高
				if(angularScope.bheight > 5) {
					toasts("层高不能超过5");
					angularScope.bheight = 0;
				}
				angularScope.$apply();
				break;
			case "tjyarea":
				//经营面积
				getDeriveNum(function() {});
				break;
		}
	}

	$('.select').change(function() {
		var thiss = this;
		$("#" + $(this).attr("id") + "_dummy").val($(this).find("option:selected").text());
		setTimeout(function() {
			$("#" + $(thiss).attr("id") + "_dummy").val($(thiss).find("option:selected").text());
		}, 200);
		setTimeout(function() {
			$("#" + $(thiss).attr("id") + "_dummy").val($(thiss).find("option:selected").text());
		}, 800);
		switch($(this).attr("id")) {
			case "selectshangquanjibie":
				//商圈级别
				setTimeout(function() {
					getDeriveNum(function() {});
				}, 200);
				break;
			case "selectzhanghaoleibie":
				//账号类别 大学食堂 可选，其他默认外包 不可变更
				var texts = $(this).find("option:selected").text();
				if(texts.indexOf("大学") >= 0 || texts.indexOf("食堂") >= 0) {
					$("#disselectjingyingshuxing").hide();
				} else {
					$("#selectjingyingshuxing option").each(function() {
						if($(this).text() == "外包") {
							angularScope.tjyproperties = $(this).val();
							//外包
							angularScope.$apply();
						}
					});

					$("#selectjingyingshuxing").trigger("change");
					//$("#selectjingyingshuxing_dummy").val($("#selectjingyingshuxing option[value='" + angularScope.tjyproperties + "']").text());

					$("#disselectjingyingshuxing").show();
				}

				setTimeout(function() {
					getDeriveNum(function() {});
				}, 200);
				break;
			case "selectshenpileixin":
				//审批类型 特殊填数量
				if($(this).find("option:selected").text().indexOf("特批") != -1) {
					$(".libequipnum").removeAttr("readonly");
				} else {
					$(".libequipnum").attr("readonly", "readonly");
				}
				setTimeout(function() {
					getDeriveNum(function() {});
				}, 200);
				break;
			case "selectsuoshushangquan":
				//所属商圈选择后带出商圈级别
				$("#selectshangquanjibie_dummy").val($("#selectshangquanjibie option[value='" + $(this).find("option:selected").attr("code") + "']").text());
				angularScope.tsqlevel = $(this).find("option:selected").attr("code");
				angularScope.$apply();
				break;
			case "selectsheng":
				bindShi($(this).val());
				//北京市才有 五星动态评级
				if($(this).find("option:selected").text() != "北京市") {
					$("#selectanzhuangfangshi_dummy").removeAttr("disabled");
					var jo = [];
					for(var i = 0; i < angularScope.dongtaipingjiBase.length; i++) {
						if(angularScope.dongtaipingjiBase[i].doc_name.indexOf("五星") == -1) {
							jo.push(angularScope.dongtaipingjiBase[i]);
						}
					}
					angularScope.dongtaipingji = jo;
					angularScope.$apply();
				} else {
					angularScope.dongtaipingji = angularScope.dongtaipingjiBase;
					angularScope.$apply();
				}
				$("#selectdongtaipingji_dummy").val("请选择");
				angularScope.tdynamicrate = null;
				$("#selectdongtaipingji_dummy").show();
				$("#imgdongtaipingji").hide();
				break;
			case "selectshi":
				bindQu($(this).val());
				bindsuoshushangquan($(this).val());
				break;
			case "selectqu":
				bindSuo($(this).val());
				break;
			case "selectdongtaipingji":
				//动态评级
				var aa = $(this).find("option:selected").text();
				selectdongtaipingji(aa);
				break;
			case "selectshebeileixing":
				//设备类型为三屏机时，安装方式只能为 立式安装
				var aa = $(this).find("option:selected").text();
				if(aa.indexOf("三屏") != -1) { ////设备类型为三屏机时，安装方式只能为 立式安装
					angularScope.anzhuangfangshi = angularScope.anzhuangfangshiBase;
					angularScope.$apply();

					$("#selectanzhuangfangshi option").each(function() {
						if($(this).text() == "立式安装") {
							$("#selectanzhuangfangshi_dummy").val("立式安装");
							angularScope.bmountway = $(this).val();
							angularScope.$apply();
							$("#selectanzhuangfangshi").trigger("change");
						}
					});

					angularScope.$apply();
					$("#selectanzhuangfangshi_dummy").attr({
						"disabled": "disabled"
					});
				} else if(aa.indexOf("单屏") != -1) { ////设备类型为单屏机时，安装方式只能为 壁挂 吊挂
					$("#selectanzhuangfangshi_dummy").removeAttr("disabled");
					var jo = [];
					for(var i = 0; i < angularScope.anzhuangfangshiBase.length; i++) {
						if(angularScope.anzhuangfangshiBase[i].doc_name.indexOf("壁挂") != -1 || angularScope.anzhuangfangshiBase[i].doc_name.indexOf("吊挂") != -1) {
							jo.push(angularScope.anzhuangfangshiBase[i]);
						}
					}
					angularScope.anzhuangfangshi = jo;
					angularScope.$apply();
					$("#selectanzhuangfangshi_dummy").val("请选择");
					angularScope.bmountway = null;
				} else if(aa.indexOf("框架") != -1) { //
					angularScope.anzhuangfangshi = angularScope.anzhuangfangshiBase;
					angularScope.$apply();

					$("#selectanzhuangfangshi_dummy").val("框架安装");

					$("#selectanzhuangfangshi option").each(function() {
						if($(this).text() == "框架安装") {
							angularScope.bmountway = $(this).val();
							angularScope.$apply();
						}
					});
					$("#selectanzhuangfangshi_dummy").attr({
						"disabled": "disabled"
					});
				} else {
					angularScope.anzhuangfangshi = angularScope.anzhuangfangshiBase;
					angularScope.$apply();
					$("#selectanzhuangfangshi_dummy").removeAttr("disabled");
				}
				break;
			case "selectjingyingleixing":
				//经营类型
				setTimeout(function() {
					//显示加逗号
					var aa = "";
					for(var i = 0; i < angularScope.tjytype.length; i++) {
						aa += ("," + $("#selectjingyingleixing option[value='" + angularScope.tjytype[i] + "']").text());
					}
					aa = aa.substring(1);
					$("#selectjingyingleixing_dummy").val(aa);
				}, 100);
				break;
			case "selectshangjialeibie":
				//商家类别
				setTimeout(function() {
					var aa = "";
					for(var i = 0; i < angularScope.tsjlb.length; i++) {
						aa += ("," + $("#selectshangjialeibie option[value='" + angularScope.tsjlb[i] + "']").text());
					}
					aa = aa.substring(1);
					$("#selectshangjialeibie_dummy").val(aa);
				}, 100);
				break;
			case "selectguanggao":
				//商家类别
				setTimeout(function() {
					var aa = "";
					for(var i = 0; i < angularScope.def24.length; i++) {
						aa += ("," + $("#selectguanggao option[value='" + angularScope.def24[i] + "']").text());
					}
					aa = aa.substring(1);
					$("#selectguanggao_dummy").val(aa);
				}, 100);
				break;
			case "selectjingyingshuxing":

				break;
			case "selectanzhuangfangshi":
				//安装方式  壁挂时层高不显示
				if($(this).find("option:selected").text().indexOf("壁挂") != -1) { //壁挂
					$(".libheight").hide();
					angularScope.bheight = "";
				} else if($(this).find("option:selected").text().indexOf("吊") != -1) { //吊装
					$(".libheight").show();
				} else {
					$(".libheight").hide();
					angularScope.bheight = "";
				}
				angularScope.$apply();
				break;
		}

		//无选择时，改为请选择
		var thiss = this;
		if(!$(this).find("option:selected").text()) {
			setTimeout(function() {
				$("#" + $(thiss).attr("id") + "_dummy").val("请选择");
			}, 110);
		}
	});
	//动态评级更改
	function selectdongtaipingji(aa) {
		$("#selectdongtaipingji_dummy").hide();
		switch(aa) {
			case "优":
				$("#imgdongtaipingji").attr("src", "../../img/myimg/typeA.png");
				break;
			case "良":
				$("#imgdongtaipingji").attr("src", "../../img/myimg/typeB.png");
				break;
			case "差":
				$("#imgdongtaipingji").attr("src", "../../img/myimg/typeC.png");
				break;
			case "五星":
				$("#imgdongtaipingji").attr("src", "../../img/myimg/type5.png");
				break;
		}
		$("#imgdongtaipingji").show();
	}

	summerready = function() {
		bindSheng();
		bindshangquanjibie();
		bindniandupingji();
		binddongtaipingji();
		bindshangdianxingzhi();
		bindqiyefenlei();
		bindjingyingshuxing();
		bindjingyingleixing();
		bindsuoshuhuanxian();
		bindshangjialeibie();
		bindguanggao();
		bindshebeileixing();
		bindanzhuangfangshi();
		bindzhanghaoleibie();
		bindShenPiLeiXin();
		bindwangluoleixin();

		$(".libequipnum").attr("readonly", "readonly");
		//修改数据 summer.pageParam.messageId
		if(summer.pageParam.messageId) {
			try {
				pageParam = summer.pageParam;
			} catch(e) {}

			switch(Number(summer.pageParam.type)) {
				case 2:
					//驳回
					$(".menu").hide();
					break;
				case 4:
					//暂存
					angularScope.billcode = summer.pageParam.messageId;
					angularScope.$apply();
					break;
			}
			changeLoadingTitle("正在读取单据..");

			//请求数据
			doPost(adressHead.ISjtzImpl2, "getSjtzXX", {
				dataParm: {
					billid: summer.pageParam.messageId //"SJS82017030800000113"
				}
			}, function(jsons) {
				changeObj = jsons.data;
				if(changeObj.tprovince) {
					bindSheng(1);
				} else {
					DindChange();
				}
			}, function(e) {
				changeLoadingTitle();
				alerts("单据查询失败，请返回重试");
			}, true);
		}else if(summer.pageParam.zc){
				changeObj = summer.pageParam.data;
				duqushangjia = true;
				if(changeObj.tprovince) {
					bindSheng(1);
				} else {
					DindChange();
				}
		}else {
			zidongdingwei();
		}
	}
	
	//单据号读取信息
	function readsjxx(){
		if(!angularScope.tsjno){
			alerts("请填写合同号后再查询");
			return;
		}
	
		//请求数据
		UM.showLoadingBar({
				text: "正在读取商家请稍等",
				icons: 'ti-reload',
			});
			doPost(adressHead.ISjtzImpl, "getSjtzXX_Ht_no", {
				dataParm: {
					tsjno: angularScope.tsjno //"SJS82017030800000113"
				}
			}, function(jsons) {
				if(jsons.result !=1){
					UM.hideLoadingBar();
					alerts(jsons.msg);
					return;
				}
				changeObj = jsons.data;
				duqushangjia = true;
				if(changeObj.tprovince) {
					bindSheng(1);
				} else {
					DindChange();
				}
			}, function(e) {
				UM.hideLoadingBar();
				alerts("单据查询失败");
			}, true);
	}
	//开始绑定
	function DindChange() {
		UM.hideLoadingBar();
		angularScope.tsjno = changeObj.tsjno;
		if(changeObj.tconimage1) {
			angularScope.tconimage1 = getImgUrl(changeObj.tconimage1);
			imgs["tconimage1"] = changeObj.tconimage1;
		}
		if(changeObj.tconimage2) {
			angularScope.tconimage2 = getImgUrl(changeObj.tconimage2);
			imgs["tconimage2"] = changeObj.tconimage2;
		}
		if(changeObj.tconimage12) {
			angularScope.tconimage12 = getImgUrl(changeObj.tconimage12);
			imgs["tconimage12"] = changeObj.tconimage12;
		}

		if(changeObj.def21) {
			angularScope.def21 = getImgUrl(changeObj.def21);
			imgs["def21"] = changeObj.def21;
		}
		if(changeObj.def22) {
			angularScope.def22 = getImgUrl(changeObj.def22);
			imgs["def22"] = changeObj.def22;
		}

		angularScope.tsjzcdz = changeObj.tsjzcdz;
		angularScope.tsjzcmc = changeObj.tsjzcmc;
		angularScope.tsjjymc = changeObj.tsjjymc;
		angularScope.tsjjydz = changeObj.tsjjydz;
		angularScope.tlongitude = changeObj.tlongitude;
		angularScope.tlatitude = changeObj.tlatitude;
		angularScope.tfddbname = changeObj.tfddbname;
		angularScope.tfddbtel1 = changeObj.tfddbtel1;
		angularScope.tfddbtel2 = changeObj.tfddbtel2;
		angularScope.tdmfzr = changeObj.tdmfzr;
		angularScope.tdmtel1 = changeObj.tdmtel1;
		angularScope.tdmtel2 = changeObj.tdmtel2;

		if(changeObj.def7) {
			angularScope.def7 = changeObj.def7;
			$("#selectwangluoleixin_dummy").val($("#selectwangluoleixin option[value='" + changeObj.def7 + "']").text());
		}

		if(changeObj.def8) {
			angularScope.def8 = changeObj.def8;
			angularScope.$apply();
			$("#selectzhanghaoleibie").trigger("change");
			$("#selectzhanghaoleibie_dummy").val($("#selectzhanghaoleibie option[value='" + changeObj.def8 + "']").text());

			if(changeObj.tjyproperties) {
				setTimeout(function() {
					angularScope.tjyproperties = changeObj.tjyproperties;
					angularScope.$apply();
					$("#selectjingyingshuxing").trigger("change");
					$("#selectjingyingshuxing_dummy").val($("#selectjingyingshuxing option[value='" + changeObj.tjyproperties + "']").text());
				}, 200);
			}
		}
		if(changeObj.def10) {
			angularScope.def10 = changeObj.def10;
			$("#selectshenpileixin").trigger("change");
			$("#selectshenpileixin_dummy").val($("#selectshenpileixin option[value='" + changeObj.def10 + "']").text());
			setTimeout(function() {
				angularScope.def15 = Number(changeObj.def15);
				angularScope.def16 = Number(changeObj.def16);
				angularScope.$apply();
			}, 200);
		}

		var aa = "";
		var obj = [];
		if(changeObj.tjytype) {
			var o = changeObj.tjytype.split(',');
			for(var i = 0; i < o.length; i++) {
				aa += ("," + $("#selectjingyingleixing option[value='" + o[i] + "']").text());
				obj.push(o[i]);
			}
			aa = aa.substring(1);
			angularScope.tjytype = obj;
			$("#selectjingyingleixing_dummy").val(aa);
		}

		aa = "";
		var bb = "";
		obj = [];
		var objs = [];
		if(changeObj.tsjlb) {
			o = changeObj.tsjlb.split(',');
			for(var i = 0; i < o.length; i++) {
				aa += ("," + $("#selectshangjialeibie option[value='" + o[i] + "']").text());
				obj.push(o[i]);
			}
			aa = aa.substring(1);
			angularScope.tsjlb = obj;
			$("#selectshangjialeibie_dummy").val(aa);
		}
		if(changeObj.def24) {
			var p = changeObj.def24.split(',');
			for(var i = 0; i < p.length; i++) {
				bb += ("," + $("#selectguanggao option[value='" + p[i] + "']").text());
				objs.push(p[i]);
			}
			bb = bb.substring(1);
			angularScope.def24 = objs;
			$("#selectguanggao_dummy").val(bb);
		}

		if(changeObj.tjyarea) {
			angularScope.tjyarea = Number(changeObj.tjyarea);
		}
		if(changeObj.tsssq) {
			setTimeout(function() {
				angularScope.tsssq = changeObj.tsssq;
				$("#selectsuoshushangquan_dummy").val($("#selectsuoshushangquan option[value='" + changeObj.tsssq + "']").text());
			}, 3000);
		}
		if(changeObj.tsshx) {
			angularScope.tsshx = changeObj.tsshx;
			$("#selectsuoshuhuanxian_dummy").val($("#selectsuoshuhuanxian option[value='" + changeObj.tsshx + "']").text());
		}
		if(changeObj.tsqlevel) {
			angularScope.tsqlevel = changeObj.tsqlevel;
			$("#selectshangquanjibie_dummy").val($("#selectshangquanjibie option[value='" + changeObj.tsqlevel + "']").text());
		}

		angularScope.tisonline = (changeObj.tisonline == "Y") ? true : false;
		angularScope.def25 = (changeObj.def25 == "Y") ? true : false;
		angularScope.$apply();
		$("#tisonline").trigger('change');
		$("#def25").trigger('change');
		if(changeObj.tprovince) {
			angularScope.tprovince = changeObj.tprovince;
			$("#selectsheng_dummy").val($("#selectsheng option[value='" + changeObj.tprovince + "']").text());
		}
		if(changeObj.tcity) {
			angularScope.tcity = changeObj.tcity;
			$("#selectshi_dummy").val($("#selectshi option[value='" + changeObj.tcity + "']").text());
		}
		if(changeObj.tdistrict) {
			angularScope.tdistrict = changeObj.tdistrict;
			$("#selectqu_dummy").val($("#selectqu option[value='" + changeObj.tdistrict + "']").text());
		}
		if(changeObj.tinstitute) {
			angularScope.tinstitute = changeObj.tinstitute;
			$("#selectsuo_dummy").val($("#selectsuo option[value='" + changeObj.tinstitute + "']").text());
		}
		if(changeObj.trjxf) {
			angularScope.trjxf = Number(changeObj.trjxf);
		}
		if(changeObj.tqyfl) {
			angularScope.tqyfl = changeObj.tqyfl;
			$("#selectqiyefenlei_dummy").val($("#selectqiyefenlei option[value='" + changeObj.tqyfl + "']").text());
		}
		if(changeObj.tmtimage) {
			angularScope.tmtimage = getImgUrl(changeObj.tmtimage);
			imgs["tmtimage"] = changeObj.tmtimage;
		}
		if(changeObj.tcyfwxkzimage) {
			angularScope.tcyfwxkzimage = getImgUrl(changeObj.tcyfwxkzimage);
			imgs["tcyfwxkzimage"] = changeObj.tcyfwxkzimage;

			angularScope.shfwzt = true;
			angularScope.$apply();
			$("#shfwzt").trigger('change');

		}
		angularScope.tcyfwxkzno = changeObj.tcyfwxkzno;
		if(changeObj.tanusualrate) {
			angularScope.tanusualrate = changeObj.tanusualrate;
			$("#selectniandupingji_dummy").val($("#selectniandupingji option[value='" + changeObj.tanusualrate + "']").text());
		}
		if(changeObj.tdynamicrate) {
			angularScope.tdynamicrate = changeObj.tdynamicrate;
			selectdongtaipingji($("#selectdongtaipingji option[value='" + changeObj.tdynamicrate + "']").text());
		}
		if(changeObj.tyylicenseimage) {
			angularScope.tyylicenseimage = getImgUrl(changeObj.tyylicenseimage);
			imgs["tyylicenseimage"] = changeObj.tyylicenseimage;
		}
		angularScope.tyylicenseno = changeObj.tyylicenseno;

		if(changeObj.tkydate) {
			angularScope.tkydate = new Date(Date.parse(changeObj.tkydate.replace(/-/g, "/")));
		}
		if(changeObj.tkdtime) {
			angularScope.tkdtime = new Date(Date.parse(("2011-11-11 " + changeObj.tkdtime).replace(/-/g, "/")));
		}
		if(changeObj.tbdtime) {
			angularScope.tbdtime = new Date(Date.parse(("2011-11-11 " + changeObj.tbdtime).replace(/-/g, "/")));
		}
		angularScope.tstorenature = changeObj.tstorenature;
		$("#selectshangdianxingzhi_dummy").val($("#selectshangdianxingzhi option[value='" + changeObj.tstorenature + "']").text());
		angularScope.tzht = (changeObj.tzht == "Y") ? true : false;
		angularScope.tsgfdemand = changeObj.tsgfdemand;
		angularScope.tsaxno = changeObj.tsaxno;
		angularScope.vnote = changeObj.vnote;
		//json2
		angularScope.bdwh = changeObj.bdwh;
		if(changeObj.bfarimage) {
			angularScope.bfarimage = getImgUrl(changeObj.bfarimage);
			imgs["bfarimage"] = changeObj.bfarimage;
		}
		if(changeObj.bcloseimage) {
			angularScope.bcloseimage = getImgUrl(changeObj.bcloseimage);
			imgs["bcloseimage"] = changeObj.bcloseimage;
		}
		if(changeObj.baroundimage) {
			angularScope.baroundimage = getImgUrl(changeObj.baroundimage);
			imgs["baroundimage"] = changeObj.baroundimage;
		}
		if(changeObj.bequiptype) {
			angularScope.bequiptype = changeObj.bequiptype;
			angularScope.$apply();
			$("#selectshebeileixing").trigger("change");
			$("#selectshebeileixing_dummy").val($("#selectshebeileixing option[value='" + changeObj.bequiptype + "']").text());
		}
		setTimeout(function() {
			angularScope.bmountway = changeObj.bmountway;
			angularScope.$apply();
			$("#selectanzhuangfangshi").trigger("change");
			$("#selectanzhuangfangshi_dummy").val($("#selectanzhuangfangshi option[value='" + changeObj.bmountway + "']").text());
			setTimeout(function() {
				angularScope.bheight = Number(changeObj.bheight);
			}, 2000);
		}, 3000);

		if(changeObj.bcamerap1) {
			angularScope.bcamerap1 =getImgUrl(changeObj.bcamerap1);
			imgs["bcamerap1"] = changeObj.bcamerap1;
		}
		if(changeObj.bcamerap2) {
			angularScope.bcamerap2 = getImgUrl(changeObj.bcamerap2);
			imgs["bcamerap2"] = changeObj.bcamerap2;
		}
		if(changeObj.def23) {
			angularScope.def23 = getImgUrl(changeObj.def23);
			imgs["def23"] = changeObj.def23;
		}
		angularScope.bcameranum = Number(changeObj.bcameranum);
		angularScope.vbnote = changeObj.vbnote;
		angularScope.bssjj = (changeObj.bssjj == "Y") ? true : false;

		angularScope.$apply();
		
		if(duqushangjia){
			changeObj = null;
		}
	}

	var app = angular.module('myApp', []);
	app.controller('myCtrl', function($scope, $http) {
		angularScope = $scope;
		$scope.def15 = 0;
		//设备数量 默认为1
		$scope.def16 = 0;
		$scope.shfwzt = false;
		$("#shfwzt").trigger("change");
	});

	//自动定位
	function ding(response) {
		try {
			//response = response.result;
			if(response.status == 0) {
				gpsPoint = response.result;
				bindSheng(2);
			}
		} catch(e) {}
	}

	function zidongdingwei() {
		var onSuccess = function(position) {
			angularScope.tlongitude = position.coords.longitude;
			//经度;
			angularScope.tlatitude = position.coords.latitude;
			//维度
			angularScope.$apply();
			$.getScript("http://api.map.baidu.com/geocoder/v2/?callback=ding&location=" + position.coords.latitude.toString() + "," + position.coords.longitude.toString() + "&output=json&ak=U7h9KjLwXhNqhglbjqlzrbNg");

		};
		var onError = function(error) {
			var i = "";
		}
		navigator.geolocation.getCurrentPosition(onSuccess, onError);

	}

	//第一步确认按钮
	var json1;

	function page1_2() {
		UM.confirm({
			title: '友情提示：',
			text: '即将跳转到点位信息录入,请确保商家信息已填写正确',
			btnText: ["取消", "确认"],
			overlay: true,
			ok: function() {
				$("#changepage2").click();
			},
			cancle: function() {}
		});
		getDeriveNum(function() {});
	}

	//第二部提交按钮 是否暂存
	function page2_submit(boo) {
		if(!angularScope.tsjno) {
			toasts("请填写合同编号");
			return;
		}
		if(!boo) {
			if(!imgs["tconimage1"]) {
				toasts("请拍照合同A面");
				return;
			}
			if(!imgs["tconimage2"]) {
				toasts("请拍照合同B面");
				return;
			}
			if(!imgs["tconimage12"]) {
				toasts("请拍照合同A+B面");
				return;
			}
			if(!angularScope.tsjzcmc) {
				toasts("请填写商家注册名称");
				return;
			}
			if(!angularScope.tsjzcdz) {
				toasts("请填写商家注册地址");
				return;
			}
			if(!angularScope.tsjjymc) {
				toasts("请填写商家经营名称");
				return;
			}
			if(!angularScope.tsjjydz) {
				toasts("请填写商家经营地址");
				return;
			}

			if(!angularScope.tfddbname) {
				toasts("请填写法定代表人名称");
				return;
			}

			if(!angularScope.tfddbtel1) {
				toasts("请填写法人联系方式1");
				return;
			} else {
				if(!checkMobile(angularScope.tfddbtel1)) {
					toasts("法人联系方式1" + "格式不正确");
					return;
				}
			}
			if(angularScope.tfddbtel2) {
				if(!checkMobile(angularScope.tfddbtel2)) {
					toasts("法人联系方式2" + "格式不正确");
					return;
				}
			}

			if(!angularScope.tdmfzr) {
				toasts("请填写店面负责人");
				return;
			}
			if(!angularScope.tdmtel1) {
				toasts("请填写店面联系方式1");
				return;
			} else {
				if(!checkMobile(angularScope.tdmtel1)) {
					toasts("店面联系方式1" + "格式不正确");
					return;
				}
			}
			if(angularScope.tdmtel2) {
				if(!checkMobile(angularScope.tdmtel2)) {
					toasts("店面联系方式2" + "格式不正确");
					return;
				}
			}
			//			if(!angularScope.tjytype) {
			//				toasts("请填写经营类型");
			//				return;
			//			}

			if(angularScope.shfwzt) {
				if(!imgs["tcyfwxkzimage"]) {
					toasts("请拍照餐饮服务许可证照");
					return;
				}
				if(!angularScope.tcyfwxkzno) {
					toasts("请填写餐饮服务许可证号");
					return;
				}
				if(!angularScope.tsaxno) {
					toasts("请填写食安心账号");
					return;
				}
			}
			if(!angularScope.tsjlb) {
				toasts("请选择商家类别");
				return;
			}
			if(angularScope.def25) {
				if(!angularScope.def24) {
					toasts("请选择商家对商业广告投放要求");
					return;
				}
			}
			if(!angularScope.def8) {
				toasts("请选择账号类别");
				return;
			}
			if(!angularScope.tjyarea) {
				toasts("请填写经营面积");
				return;
			} else {
				//				if(!new RegExp("^[0-9]*[1-9][0-9]*$").test(angularScope.tjyarea)) {
				//					toasts("经营面积" + "格式不正确");
				//					return;
				//				}
			}
			if(!angularScope.tsssq) {
				toasts("请填写所属商圈");
				return;
			}
			if(!angularScope.tsshx) {
				toasts("请填写所属环线");
				return;
			}
			if(!angularScope.tsqlevel) {
				toasts("请填写商圈级别");
				return;
			}
			if(!angularScope.tprovince) {
				toasts("请填写省");
				return;
			}
			if(!angularScope.tcity) {
				toasts("请填写市");
				return;
			}
			if(!angularScope.tdistrict) {
				toasts("请填写区");
				return;
			}
			if(!angularScope.tinstitute) {
				toasts("请填写所");
				return;
			}
			if(!angularScope.trjxf) {
				toasts("请填写人均消费");
				return;
			} else {
				if(!new RegExp("^[0-9]*[1-9][0-9]*$").test(angularScope.trjxf)) {
					toasts("人均消费" + "格式不正确");
					return;
				}
			}
			if(!angularScope.tqyfl) {
				toasts("请填写企业分类");
				return;
			}
			if(!angularScope.tjyproperties) {
				toasts("请填写经营属性");
				return;
			}

			if($("#selectjingyingshuxing").find("option:selected").text().indexOf("外包") != -1) { //
				if(!imgs["tyylicenseimage"]) {
					toasts("请填写营业执照");
					return;
				}
				if(!angularScope.tyylicenseno) {
					toasts("请填写营业执照号");
					return;
				}
			}
			if(!imgs["tmtimage"]) {
				toasts("请填写门头照");
				return;
			}
			if(!angularScope.tanusualrate) {
				toasts("请填写年度评级");
				return;
			}
			if(!angularScope.tdynamicrate) {
				toasts("请填写动态评级");
				return;
			}

			if(!angularScope.tkydate) {
				toasts("请填写开业时间");
				return;
			}
			if(!angularScope.tkdtime) {
				toasts("请填写开店时间");
				return;
			}
			if(!angularScope.tbdtime) {
				toasts("请填写闭店时间");
				return;
			}
			if(!angularScope.tstorenature) {
				toasts("请填写商店性质");
				return;
			}
			if(angularScope.tisonline) {
				if(!angularScope.def7) {
					toasts("请选择网络类型");
					return;
				}
			}
		}
		var tjytypeStr = "";
		try {
			for(var i = 0; i < angularScope.tjytype.length; i++) {
				tjytypeStr += ("," + angularScope.tjytype[i]);
			}
			tjytypeStr = tjytypeStr.substring(1);
		} catch(e) {}

		var tsjlbStr = "";
		var def24Str = "";

		try {
			for(var i = 0; i < angularScope.tsjlb.length; i++) {
				tsjlbStr += ("," + angularScope.tsjlb[i]);
			}
			tsjlbStr = tsjlbStr.substring(1);
		} catch(e) {}
		try {
			for(var i = 0; i < angularScope.def24.length; i++) {
				def24Str += ("," + angularScope.def24[i]);
			}
			def24Str = def24Str.substring(1);
		} catch(e) {}
		//imgsbm();
		
		json1 = {
			tsjno: (angularScope.tsjno == null) ? "" : angularScope.tsjno,
			tconimage1: (imgs["tconimage1"] == null) ? "" : imgs["tconimage1"],
			tconimage2: (imgs["tconimage2"] == null) ? "" : imgs["tconimage2"],
			tconimage12: (imgs["tconimage12"] == null) ? "" : imgs["tconimage12"],
			tsjzcdz: (angularScope.tsjzcdz == null) ? "" : angularScope.tsjzcdz,
			tsjzcmc: (angularScope.tsjzcmc == null) ? "" : angularScope.tsjzcmc,
			tsjjymc: (angularScope.tsjjymc == null) ? "" : angularScope.tsjjymc,
			tsjjydz: (angularScope.tsjjydz == null) ? "" : angularScope.tsjjydz,
			tlongitude: (angularScope.tlongitude == null) ? "" : angularScope.tlongitude,
			tlatitude: (angularScope.tlatitude == null) ? "" : angularScope.tlatitude,
			tfddbname: (angularScope.tfddbname == null) ? "" : angularScope.tfddbname,
			tfddbtel1: (angularScope.tfddbtel1 == null) ? "" : angularScope.tfddbtel1,
			tfddbtel2: (angularScope.tfddbtel2 == null) ? "" : angularScope.tfddbtel2,
			tdmfzr: (angularScope.tdmfzr == null) ? "" : angularScope.tdmfzr,
			tdmtel1: (angularScope.tdmtel1 == null) ? "" : angularScope.tdmtel1,
			tdmtel2: (angularScope.tdmtel2 == null) ? "" : angularScope.tdmtel2,

			tjytype: tjytypeStr,
			tsjlb: tsjlbStr,
			def24: def24Str,

			def21: imgs["def21"] || "",
			def22: imgs["def22"] || "",
			def8: (angularScope.def8 == null) ? "" : angularScope.def8,
			tjyarea: (angularScope.tjyarea == null) ? "" : angularScope.tjyarea,
			tsssq: (angularScope.tsssq == null) ? "" : angularScope.tsssq,
			tsshx: (angularScope.tsshx == null) ? "" : angularScope.tsshx,
			tsqlevel: (angularScope.tsqlevel == null) ? "" : angularScope.tsqlevel,
			tisonline: (angularScope.tisonline) ? "Y" : "N",
			def25: (angularScope.def25) ? "Y" : "N",
			tprovince: (angularScope.tprovince == null) ? "" : angularScope.tprovince,
			tcity: (angularScope.tcity == null) ? "" : angularScope.tcity,
			tdistrict: (angularScope.tdistrict == null) ? "" : angularScope.tdistrict,
			tinstitute: (angularScope.tinstitute == null) ? "" : angularScope.tinstitute,
			trjxf: (angularScope.trjxf == null) ? "" : angularScope.trjxf,
			tqyfl: (angularScope.tqyfl == null) ? "" : angularScope.tqyfl,
			tjyproperties: (angularScope.tjyproperties == null) ? "" : angularScope.tjyproperties,
			tmtimage: (imgs["tmtimage"] == null) ? "" : imgs["tmtimage"],
			tcyfwxkzimage: (imgs["tcyfwxkzimage"] == null) ? "" : imgs["tcyfwxkzimage"],
			tcyfwxkzno: (angularScope.tcyfwxkzno == null) ? "" : angularScope.tcyfwxkzno,
			tanusualrate: (angularScope.tanusualrate == null) ? "" : angularScope.tanusualrate,
			tdynamicrate: (angularScope.tdynamicrate == null) ? "" : angularScope.tdynamicrate,
			tyylicenseimage: (imgs["tyylicenseimage"] == null) ? "" : imgs["tyylicenseimage"],
			tyylicenseno: (angularScope.tyylicenseno == null) ? "" : angularScope.tyylicenseno,
			tkydate: angularScope.tkydate == null ? "" : (angularScope.tkydate.getFullYear() + "-" + (angularScope.tkydate.getMonth() + 1) + "-" + angularScope.tkydate.getDate()),
			tkdtime: (angularScope.tkdtime == null) ? "" : (angularScope.tkdtime.getHours() + ":" + angularScope.tkdtime.getMinutes()),
			tbdtime: (angularScope.tbdtime == null) ? "" : (angularScope.tbdtime.getHours() + ":" + angularScope.tbdtime.getMinutes()),
			tstorenature: (angularScope.tstorenature == null) ? "" : angularScope.tstorenature,
			tzht: (angularScope.tzht) ? "Y" : "N",
			tsgfdemand: (angularScope.tsgfdemand == null) ? "" : angularScope.tsgfdemand,
			tsaxno: (angularScope.tsaxno == null) ? "" : angularScope.tsaxno,
			vnote: (angularScope.vnote == null) ? "" : angularScope.vnote,
			def10: (!angularScope.def10) ? "" : angularScope.def10,
			def7: (!angularScope.def7) ? "" : angularScope.def7,
		};

		/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

		if(!angularScope.bdwh) {
			toasts("请填写" + "点位号");
			return;
		}
		if(!boo) {
			if(!imgs["bfarimage"]) {
				toasts("请填写" + "远景照");
				return;
			}
			if(!imgs["bcloseimage"]) {
				toasts("请填写" + "近景照");
				return;
			}
			if(!imgs["baroundimage"]) {
				toasts("请填写" + "全景照");
				return;
			}
			if(!angularScope.bequiptype) {
				toasts("请填写" + "设备类型");
				return;
			}
			//			if(!angularScope.bequipnum) {
			//				toasts("请填写" + "设备数量");
			//				return;
			//			} else {
			//				if(!new RegExp("^[0-9]*[1-9][0-9]*$").test(angularScope.bequipnum)) {
			//					toasts("设备数量" + "格式不正确");
			//					return;
			//				}
			//			}
			if(!angularScope.bmountway) {
				toasts("请填写" + "安装方式");
				return;
			}
			if(angularScope.bcameranum == null) {
				toasts("请填写" + "摄像机数量");
				return;
			} else {
				//摄像头数量可为0
				if(!new RegExp("^[0-9]*[1-9][0-9]*$").test(angularScope.bcameranum) && Number(angularScope.bcameranum) != 0) {
					toasts("摄像机数量" + "格式不正确");
					return;
				}
			}

			if($("#selectanzhuangfangshi_dummy").val().indexOf("吊挂") != -1) {
				if(!angularScope.bheight) {
					toasts("安装方式为吊挂时，请填写" + "层高");
					//层高为浮点数
					return;
				}
				if(Number(angularScope.bheight) > 5) {
					toasts("安装方式为吊挂时，" + "层高不能超过5");
					//层高为浮点数
					return;
				}
			}
		}

		UM.confirm({
			title: '友情提示:',
			text: '确认要提交到服务器吗？',
			btnText: ["取消", "提交"],
			overlay: true,
			ok: function() {
				getDeriveNum(function() {
					page2_submit2(boo);
				});
			},
			cancle: function() {}
		});
	}

	function getDeriveNum(fun) {
		if(angularScope.tsqlevel && angularScope.def8 && angularScope.tjyarea && $("#selectshenpileixin").find("option:selected").text() == "正常") {
			doPost(adressHead.ISjtzImpl, "getSbAz_num", {
				dataParm: {
					tsqlevel: angularScope.tsqlevel,
					tsjlb: angularScope.def8,
					tjyarea: angularScope.tjyarea
				}
			}, function(jsons) {
				if(jsons.result == 1) {
					angularScope.def15 = Number(jsons.def15);
					angularScope.def16 = Number(jsons.def16);
					angularScope.$apply();
				} else {
					alerts("提示：" + jsons.msg);
				}
				fun();
			}, null, true);
		} else {
			fun();
		}
	}

	function page2_submit2(boo) {
		var myDate = new Date();
		var userinfo = summer.getStorage("userinfo");
		var gs = summer.getStorage("selectjson");
		//选择的公司信息
		var json2 = {
			TipCodeNum: "", //驳回消息的单据号
			billcode: (!angularScope.billcode) ? "" : angularScope.billcode, //暂存的单据号
			pk_org: gs.pk_doc, //公司信息
			bdwh: angularScope.bdwh == null ? "" : angularScope.bdwh,
			creator: userinfo.empId, //制单人
			bqryr: userinfo.psnid, //签约人员
			bssbm: userinfo.departMentId, //部门
			bqrrq: myDate.getFullYear() + "-" + (myDate.getMonth() + 1) + "-" + myDate.getDate(),
			bqrsj: myDate.getHours() + ":" + myDate.getMinutes() + ":" + myDate.getSeconds(),
			bfarimage: imgs["bfarimage"] == null ? "" : imgs["bfarimage"],
			bcloseimage: imgs["bcloseimage"] == null ? "" : imgs["bcloseimage"],
			baroundimage: imgs["baroundimage"] == null ? "" : imgs["baroundimage"],
			bequiptype: angularScope.bequiptype == null ? "" : angularScope.bequiptype,
			bequipnum: 1, //angularScope.bequipnum == null ? "" : angularScope.bequipnum,
			def15: angularScope.def15 == null ? "" : angularScope.def15,
			def16: angularScope.def16 == null ? "" : angularScope.def16,
			bmountway: angularScope.bmountway == null ? "" : angularScope.bmountway,
			bcamerap1: imgs["bcamerap1"] == null ? "" : imgs["bcamerap1"],
			bcamerap2: imgs["bcamerap2"] == null ? "" : imgs["bcamerap2"],
			def23: imgs["def23"] == null ? "" : imgs["def23"],
			bcameranum: angularScope.bcameranum == null ? "" : angularScope.bcameranum,
			bheight: angularScope.bheight == null ? "" : angularScope.bheight,
			vbnote: angularScope.vbnote == null ? "" : angularScope.vbnote,
			bssjj: (angularScope.bssjj) ? "Y" : "N",
			def13: 0,
			def14: 0,
		};

		if($("#selectanzhuangfangshi").find("option:selected").text().indexOf("吊") != -1) { //吊装 支架数量为1
			json2.def13 = 1;
			if(Number(angularScope.bheight) >= 3) { //吊装 层高大于3 加长装置为1
				json2.def14 = 1;
			}
		}

		if(boo) { //暂存
			json2.is_temporary = "Y";
		} else { //保存
			json2.is_temporary = "N";
			if(summer.pageParam.type == "4") { //暂存
			} else if(summer.pageParam.type == "2") { //驳回
				json2.TipCodeNum = (!pageParam) ? "" : pageParam.messageId;
				json2.billcode = "";
				//暂存的单据号
			}
		}
		var json3 = $.extend(json1, json2);
		json1 = null;
		json2 = null;
		
		
		
		
		doPost(adressHead.ISjtzImpl2, "pushSjtzd", {
			dataParm: json3
		}, function(jsons) {
			if(jsons.result == 1) {
				if(boo) { //暂存
					toasts("暂存成功" + jsons.vbillcode);
					angularScope.billcode = jsons.vbillcode;
					angularScope.$apply();
					//vbillcode
				} else { //保存
					toasts("保存成功");
					pageParam = null;
					var codes = angularScope.bdwh.split('-');
					if(codes.length == 2) {
						angularScope.bdwh = codes[0] + "-" + (Number(codes[1]) + 1).toString();
					} else {
						angularScope.bdwh = null;
					}
					angularScope.$apply();

					imgs["bfarimage"] = null;
					imgs["bcloseimage"] = null;
					imgs["baroundimage"] = null;
					angularScope.bequiptype = null;
					//angularScope.bequipnum = 0;
					angularScope.bmountway = null;
					imgs["bcamerap1"] = null;
					imgs["bcamerap2"] = null;
					imgs["def23"] = null;
					angularScope.bcameranum = null;
					angularScope.bheight = null;
					angularScope.vbnote = null;
					angularScope.bssjj = false;
					angularScope.billcode = "";
					angularScope.$apply();
					$("#selectshebeileixing_dummy").val("请选择");
					$("#selectanzhuangfangshi_dummy").val("请选择");
					$("#bfarimage").attr("src", "../../img/myimg/camera.png");
					$("#bcloseimage").attr("src", "../../img/myimg/camera.png");
					$("#baroundimage").attr("src", "../../img/myimg/camera.png");
					$("#bcamerap1").attr("src", "../../img/myimg/camera.png");
					$("#bcamerap2").attr("src", "../../img/myimg/camera.png");
					$("#def23").attr("src", "../../img/myimg/camera.png");
				}
			} else {
				alerts("提示：" + jsons.msg);
			}
		});
	}

	$(".bbback").click(function() {
		setTimeout(function() {
			getDeriveNum(function() {});
		}, 200);
	});

	//相机打开

	//	function openCameraSelect(obj) {
	//		UM.confirm({
	//			title: '请选择',
	//			text: '请选择图片来源？',
	//			btnText: ["拍照", "相册"],
	//			overlay: true,
	//			ok: function() { //1
	//				summer.openPhotoAlbum({
	//					compressionRatio: 0.2,
	//					callback: function(args) {
	//						UM.showLoadingBar({
	//							text: "请稍等",
	//							icons: 'ti-reload',
	//						});
	//						getBase64Image(args.compressImgPath, function(dat) {
	//							obj.src = dat;
	//							imgs[obj.id] = dat;
	//							UM.hideLoadingBar();
	//						});
	//					}
	//				});
	//			},
	//			cancle: function() { //0
	//				openCamera(obj);
	//			}
	//		});
	//	}

	$(function() {
		var opt = {
			'date': {
				preset: 'date'
			},
			'select': {
				preset: 'select'
			}
		};
		$('.select').scroller('destroy').scroller($.extend(opt['select'], {
			theme: "ios7",
			mode: "scroller",
			display: "bottom",
			animate: ""
		}));
		$('.select').each(function(a, b) {
			$("#" + b.id + "_dummy").addClass("select_dummy");
			$("#" + b.id + "_dummy").val("请选择");
		});

		$("img.camera").attr("src", "../../img/myimg/camera.png");
	});

	$("#imgdongtaipingji").click(function() {
		$("#selectdongtaipingji_dummy").click();
	});

	$(document).ready(function() {
		$("#selectwangluoleixin_dummy").val("请选择");
		$("#selectsuoshushangquan_dummy").val("请选择");
		$(".lidef7").hide();
		$(".lidef24").hide();
		$(".libheight").hide();
	});

	$('.menu').on('click', function() {
		UM.confirm({
			title: '',
			text: '友情提示：选择暂存方式',
			btnText: ["暂存当前", "暂存为新"],
			overlay: true,
			ok: function() { //暂存为新

				pageParam = null;
				angularScope.billcode = "";
				angularScope.$apply();
				page2_submit(true);
			},
			cancle: function() { //当前
				pageParam = null;
				page2_submit(true);
			}
		});
	});
	
	$(".readzc").on('click', function() {
		
	});
</script>
<script src="../../js/Myjs/Common.js"></script>
<script src="../../js/timePicker.js"></script>